package com.wuxin.config;


import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @program: jinrongxiangmu
 * @ClassName ContantsProperties
 * @description: 解析配置文件中自定义的配置 短信
 * @author: 李尧坤
 * @create: 2025−01-16 19:18
 * @Version 1.0
 **/

@Component
public class ContantsProperties implements InitializingBean {



    @Value("${aliyun.sms.regionid}")
    private String regionid;  //区域

    @Value("${aliyun.sms.accesskeyid}")
    private String accesskeyid; //短信的key

    @Value("${aliyun.sms.accesskeyssecret}")
    private String accesskeyssecret; // 短信的密钥

    public static  String REGION_ID;
    public static  String ACCESS_KEY_ID;
    public static  String ACCESSKEY_SSECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        REGION_ID=regionid;
        ACCESS_KEY_ID=accesskeyid;
        ACCESSKEY_SSECRET=accesskeyssecret;
    }
}